<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

	<ui:remove>
		<!-- roleIdx = 0: Receptionist, 1: Analyst, 2: Editor,  3: Approver -->
		<!-- Parameters: permit (HND_Permit), roleIdx (int), hideTitle (boolean) -->
	</ui:remove>

	<h:panelGroup rendered="#{roleIdx == 0}">	
		<h:panelGroup rendered="#{not hideTitle}">
			<strong>#{messages['viewtransaction.receptionist']}</strong>
			<rich:separator lineType="solid" />
			<br />
		</h:panelGroup>
		<h:panelGrid width="80%" columns="2" columnClasses="introCol1,introCol2">
			<h:outputText value="#{messages['viewtransaction.receptionist_username']}" />
			<h:outputText value="#{permit.receptionistUserName}" />

			<h:outputText value="#{messages['viewtransaction.receptionist_fullname']}" />
			<h:outputText value="#{permit.receptionistFullName}" />
		</h:panelGrid>
	</h:panelGroup>	

	<h:panelGroup rendered="#{roleIdx == 1}">	
		<h:panelGroup rendered="#{not hideTitle}">
			<strong>#{messages['viewtransaction.analyst']}</strong>
			<rich:separator lineType="solid" />
			<br />
		</h:panelGroup>
		<h:panelGrid width="80%" columns="2" columnClasses="introCol1,introCol2">
			<h:outputText value="#{messages['viewtransaction.analyst_username']}" />
			<h:outputText value="#{permit.analystUserName}" />

			<h:outputText value="#{messages['viewtransaction.analyst_fullname']}" />
			<h:outputText value="#{permit.analystFullName}" />
		</h:panelGrid>
	</h:panelGroup>	
	
	<h:panelGroup rendered="#{roleIdx == 2}">	
		<h:panelGroup rendered="#{not hideTitle}">
			<strong>#{messages['viewtransaction.editor']}</strong>
			<rich:separator lineType="solid" />
			<br />
		</h:panelGroup>
		<h:panelGrid width="80%" columns="2" columnClasses="introCol1,introCol2">
			<h:outputText value="#{messages['viewtransaction.editor_username']}" />
			<h:outputText value="#{permit.editorUserName}" />

			<h:outputText value="#{messages['viewtransaction.editor_fullname']}" />
			<h:outputText value="#{permit.editorFullName}" />
		</h:panelGrid>
	</h:panelGroup>	

	<h:panelGroup rendered="#{roleIdx == 3}">	
		<h:panelGroup rendered="#{not hideTitle}">
			<strong>#{messages['viewtransaction.approver']}</strong>
			<rich:separator lineType="solid" />
			<br />
		</h:panelGroup>
		<h:panelGrid width="80%" columns="2" columnClasses="introCol1,introCol2">
			<h:outputText value="#{messages['viewtransaction.approver_username']}" />
			<h:outputText value="#{permit.approverUserName}" />

			<h:outputText value="#{messages['viewtransaction.approver_fullname']}" />
			<h:outputText value="#{permit.approverFullName}" />
		</h:panelGrid>
	</h:panelGroup>	
</ui:composition>
